package com.yfp.operation.mapper;

import com.yfp.common.core.domain.R;
import com.yfp.operation.domain.LotteryRecordsClientRecords;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yfp.operation.domain.dto.participationInfoDTO;
import com.yfp.operation.domain.vo.ParticipationInfoVO;
import com.yfp.operation.domain.vo.ParticipationVO;
import com.yfp.operation.domain.vo.PrizeListVO;
import com.yfp.operation.domain.vo.participationPositionDataVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author admin
* @description 针对表【lottery_records_client_records(抽奖-用户参与记录表)】的数据库操作Mapper
* @createDate 2024-12-30 10:00:12
* @Entity domain.com.yfp.operation.LotteryRecordsClientRecords
*/
public interface LotteryRecordsClientRecordsMapper extends BaseMapper<LotteryRecordsClientRecords> {

    /**
     * 根据抽奖主表id统计参与人数
     * @param ids
     * @return
     */
    List<LotteryRecordsClientRecords> statisticsClient(@Param("ids") List<Long> ids);

    /**
     * 参与详情
     * @param participationInfoDTO
     * @return
     */
    List<ParticipationVO> participation(participationInfoDTO participationInfoDTO);

    /**
     * 奖品列表
     *
     * @param clientId
     * @return
     */
    List<PrizeListVO> prizeList(@Param("clientId") String clientId, @Param("lotteryId") Long lotteryId);

    /**
     * 参与详情
     * @param lotteryId
     * @param positionName
     * @return
     */
    ParticipationInfoVO participationInfo(@Param("lotteryId") Long lotteryId, @Param("positionName") String positionName);

    /**
     * 参与点位数据
     * @param lotteryId
     * @param positionName
     * @return
     */
    List<participationPositionDataVO> participationPositionData(@Param("lotteryId") Long lotteryId, @Param("positionName") String positionName);

    /**
     * 插入
     * @param records
     */
    void add(LotteryRecordsClientRecords records);

    /**
     * 总参与人数
     * @param lotteryId
     * @return
     */
    Integer getClientNum(Long lotteryId);
}




